//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.loby.monitor.client.propertie;

import com.alibaba.fastjson.JSONObject;
import com.loby.monitor.excess.local.LimberAlarmCondition;
import java.util.List;
import java.util.Objects;

public class ClientProperty {
    List<ForwardInfo> forwardInfos;
    LimberAlarmCondition alarmCondition;
    String name;
    String clientCode;
    String realTableName;
    String minTableName;
    String hourTableName;
    String dayTableName;
    String excessTableName;
    String pwd;
    boolean isRequireResponse;
    boolean isRequireSplit;
    int protocol;

    public ClientProperty() {
    }

    public ClientProperty(List<ForwardInfo> forwardInfos, LimberAlarmCondition alarmCondition, String name, String clientCode, String realTableName, String minTableName, String hourTableName, String dayTableName, String excessTableName, String pwd, boolean isRequireResponse, boolean isRequireSplit, int protocol) {
        this.forwardInfos = forwardInfos;
        this.alarmCondition = alarmCondition;
        this.name = name;
        this.clientCode = clientCode;
        this.realTableName = realTableName;
        this.minTableName = minTableName;
        this.hourTableName = hourTableName;
        this.dayTableName = dayTableName;
        this.excessTableName = excessTableName;
        this.pwd = pwd;
        this.isRequireResponse = isRequireResponse;
        this.isRequireSplit = isRequireSplit;
        this.protocol = protocol;
    }

    public String toJosn() {
        return JSONObject.toJSONString(this, true);
    }

    public static ClientProperty fromJson(String json) {
        return (ClientProperty)JSONObject.parseObject(json, ClientProperty.class);
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        } else if (o != null && this.getClass() == o.getClass()) {
            ClientProperty that = (ClientProperty)o;
            return this.protocol == that.protocol && Objects.equals(this.forwardInfos, that.forwardInfos) && Objects.equals(this.alarmCondition, that.alarmCondition) && this.name.equals(that.name) && this.clientCode.equals(that.clientCode) && Objects.equals(this.realTableName, that.realTableName) && Objects.equals(this.minTableName, that.minTableName) && Objects.equals(this.hourTableName, that.hourTableName) && Objects.equals(this.dayTableName, that.dayTableName) && Objects.equals(this.excessTableName, that.excessTableName) && Objects.equals(this.pwd, that.pwd);
        } else {
            return false;
        }
    }

    @Override
    public int hashCode() {
        return Objects.hash(new Object[]{this.forwardInfos, this.alarmCondition, this.name, this.clientCode, this.realTableName, this.minTableName, this.hourTableName, this.dayTableName, this.excessTableName, this.pwd, this.protocol});
    }

    public static ClientProperty.ClientPropertyBuilder builder() {
        return new ClientProperty.ClientPropertyBuilder();
    }

    public List<ForwardInfo> getForwardInfos() {
        return this.forwardInfos;
    }

    public LimberAlarmCondition getAlarmCondition() {
        return this.alarmCondition;
    }

    public String getName() {
        return this.name;
    }

    public String getClientCode() {
        return this.clientCode;
    }

    public String getRealTableName() {
        return this.realTableName;
    }

    public String getMinTableName() {
        return this.minTableName;
    }

    public String getHourTableName() {
        return this.hourTableName;
    }

    public String getDayTableName() {
        return this.dayTableName;
    }

    public String getExcessTableName() {
        return this.excessTableName;
    }

    public String getPwd() {
        return this.pwd;
    }

    public boolean isRequireResponse() {
        return this.isRequireResponse;
    }

    public boolean isRequireSplit() {
        return this.isRequireSplit;
    }

    public int getProtocol() {
        return this.protocol;
    }

    public void setForwardInfos(List<ForwardInfo> forwardInfos) {
        this.forwardInfos = forwardInfos;
    }

    public void setAlarmCondition(LimberAlarmCondition alarmCondition) {
        this.alarmCondition = alarmCondition;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setClientCode(String clientCode) {
        this.clientCode = clientCode;
    }

    public void setRealTableName(String realTableName) {
        this.realTableName = realTableName;
    }

    public void setMinTableName(String minTableName) {
        this.minTableName = minTableName;
    }

    public void setHourTableName(String hourTableName) {
        this.hourTableName = hourTableName;
    }

    public void setDayTableName(String dayTableName) {
        this.dayTableName = dayTableName;
    }

    public void setExcessTableName(String excessTableName) {
        this.excessTableName = excessTableName;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    public void setRequireResponse(boolean isRequireResponse) {
        this.isRequireResponse = isRequireResponse;
    }

    public void setRequireSplit(boolean isRequireSplit) {
        this.isRequireSplit = isRequireSplit;
    }

    public void setProtocol(int protocol) {
        this.protocol = protocol;
    }

    @Override
    public String toString() {
        return "ClientProperty(forwardInfos=" + this.getForwardInfos() + ", alarmCondition=" + this.getAlarmCondition() + ", name=" + this.getName() + ", clientCode=" + this.getClientCode() + ", realTableName=" + this.getRealTableName() + ", minTableName=" + this.getMinTableName() + ", hourTableName=" + this.getHourTableName() + ", dayTableName=" + this.getDayTableName() + ", excessTableName=" + this.getExcessTableName() + ", pwd=" + this.getPwd() + ", isRequireResponse=" + this.isRequireResponse() + ", isRequireSplit=" + this.isRequireSplit() + ", protocol=" + this.getProtocol() + ")";
    }

    public static class ClientPropertyBuilder {
        private List<ForwardInfo> forwardInfos;
        private LimberAlarmCondition alarmCondition;
        private String name;
        private String clientCode;
        private String realTableName;
        private String minTableName;
        private String hourTableName;
        private String dayTableName;
        private String excessTableName;
        private String pwd;
        private boolean isRequireResponse;
        private boolean isRequireSplit;
        private int protocol;

        ClientPropertyBuilder() {
        }

        public ClientProperty.ClientPropertyBuilder forwardInfos(List<ForwardInfo> forwardInfos) {
            this.forwardInfos = forwardInfos;
            return this;
        }

        public ClientProperty.ClientPropertyBuilder alarmCondition(LimberAlarmCondition alarmCondition) {
            this.alarmCondition = alarmCondition;
            return this;
        }

        public ClientProperty.ClientPropertyBuilder name(String name) {
            this.name = name;
            return this;
        }

        public ClientProperty.ClientPropertyBuilder clientCode(String clientCode) {
            this.clientCode = clientCode;
            return this;
        }

        public ClientProperty.ClientPropertyBuilder realTableName(String realTableName) {
            this.realTableName = realTableName;
            return this;
        }

        public ClientProperty.ClientPropertyBuilder minTableName(String minTableName) {
            this.minTableName = minTableName;
            return this;
        }

        public ClientProperty.ClientPropertyBuilder hourTableName(String hourTableName) {
            this.hourTableName = hourTableName;
            return this;
        }

        public ClientProperty.ClientPropertyBuilder dayTableName(String dayTableName) {
            this.dayTableName = dayTableName;
            return this;
        }

        public ClientProperty.ClientPropertyBuilder excessTableName(String excessTableName) {
            this.excessTableName = excessTableName;
            return this;
        }

        public ClientProperty.ClientPropertyBuilder pwd(String pwd) {
            this.pwd = pwd;
            return this;
        }

        public ClientProperty.ClientPropertyBuilder isRequireResponse(boolean isRequireResponse) {
            this.isRequireResponse = isRequireResponse;
            return this;
        }

        public ClientProperty.ClientPropertyBuilder isRequireSplit(boolean isRequireSplit) {
            this.isRequireSplit = isRequireSplit;
            return this;
        }

        public ClientProperty.ClientPropertyBuilder protocol(int protocol) {
            this.protocol = protocol;
            return this;
        }

        public ClientProperty build() {
            return new ClientProperty(this.forwardInfos, this.alarmCondition, this.name, this.clientCode, this.realTableName, this.minTableName, this.hourTableName, this.dayTableName, this.excessTableName, this.pwd, this.isRequireResponse, this.isRequireSplit, this.protocol);
        }

        @Override
        public String toString() {
            return "ClientProperty.ClientPropertyBuilder(forwardInfos=" + this.forwardInfos + ", alarmCondition=" + this.alarmCondition + ", name=" + this.name + ", clientCode=" + this.clientCode + ", realTableName=" + this.realTableName + ", minTableName=" + this.minTableName + ", hourTableName=" + this.hourTableName + ", dayTableName=" + this.dayTableName + ", excessTableName=" + this.excessTableName + ", pwd=" + this.pwd + ", isRequireResponse=" + this.isRequireResponse + ", isRequireSplit=" + this.isRequireSplit + ", protocol=" + this.protocol + ")";
        }
    }
}
